<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	 <script>
        function a (name) {
            this.name = name;
            this.num = [1,2,3];
        }
        a.prototype.say = function(){
            alert(this.num)
        };
        function b (name) {
            a.call(this, name);
        }
        b.prototype = new a();


        var c = new b('c');
        var d = new a('d');

        d.num.push(4);
        console.log(c.name) // c
        console.log(d.name) // d

        alert(c.num) // 123
        alert(d.num) //1234
    </script>
</body>
</html>